]> dgit.raspbian.org Git - gnome-shell.git/commit
iconGrid: Don't hide children inside allocation loop
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 6 Jun 2019 21:21:13 +0000 (23:21 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 15 Jun 2019 12:31:50 +0000 (12:31 +0000)
commit520cea93941bfef1ec7bcaf30427d6a7b4036eb3
tree0347b20f1cda01c4780ef9e3b1ff13e42b367b6e
parent58c4212cfa1339e54c88788e999cc8c4b8f51e8f
iconGrid: Don't hide children inside allocation loop

Hiding a child implies a parent reallocation, and IconGrid does it for the
children that doesn't fit in the available space, but this could lead to an
allocation recursion cycle. This has been introduced by commit 0e0574a0 to
reduce CPU usage not to using JS vfuncs.

To avoid this, toggle the children opacity instead so that we can achieve the
same visibility result, without any reallocation need.
In this way we also fix the case where hidden children can be shown again,
as _getVisibleChildren doesn't filter-out transparent ones, restoring the
pre-commit 0e0574a0 behavior.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1336

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
js/ui/iconGrid.js